<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>博客首页</title>
</head>
<body>
{% for blog in blogs %}
    <h4>
        <a href="{% url 'article' article_id=blog.id %}" target="_blank">
            {{ blog.title }}
        </a>
    </h4>
    <p>{{ blog.pub_date }}</p>
    <p>{{ blog.text | truncatewords:20 }}</p>
{% endfor %}
</body>
</html>